$OpenBSD: patch-sam_Makefile,v 1.2 2016/03/17 21:07:32 naddy Exp $
--- sam/Makefile.orig	Thu Mar 17 21:21:48 2016
+++ sam/Makefile	Thu Mar 17 21:21:48 2016
@@ -8,7 +8,7 @@
 #	
 #	Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
 #	if your compiler supports posix-compatible compilation
-OS=-DIRIX5 -ansiposix
+OS=-D_POSIX_SOURCE -DSOLARIS
 
 #	add -Iincludedir for any include directories that need to be searched
 #	for posix header files (for UMIPS, add -I/usr/include/posix)
@@ -22,12 +22,12 @@ HOMEDIR=HOME
 #	where sam is to be installed.  SAMSAVEDIR is the name of the directory
 #	where the samsave file restoration script is stored.
 RSAMNAME=sam
-TERMNAME=/v/bin/samterm
-SAMDIR=/usr/bin
-SAMSAVEDIR=/v/bin
+TERMNAME=${PREFIX}/bin/samterm
+SAMDIR=${PREFIX}/bin
+SAMSAVEDIR=${PREFIX}/bin
 
 #	Set TMP to a good place for tmp files (with lots of room)
-TMP=/tmp
+TMP=/var/tmp
 
 #	Set SHELLNAME and SHELLPATH to the name of a shell and the pathname
 #	of its executable
@@ -36,12 +36,12 @@ SHELLPATH=/bin/sh
 
 #	Set RXNAME and RXPATHNAME to the name of the remote execution command
 #	and the pathname of its executable
-RXNAME=rsh
-RXPATHNAME=/usr/bsd/rsh
+RXNAME=ssh
+RXPATHNAME=/usr/bin/ssh
 
 SAMSAVE=/bin/sh\\n$(SAMSAVEDIR)/samsave
 
-CFLAGS=$(OS) -D_LIBXG_EXTENSION $(INCS)
+CFLAGS+=$(OS) -D_LIBXG_EXTENSION $(INCS)
 
 SYSFLAGS=  -DHOMEDIR=\"$(HOMEDIR)\" -DRSAMNAME=\"$(RSAMNAME)\" \
 		-DTERMNAME=\"$(TERMNAME)\" -DTMP=\"$(TMP)\" \
@@ -50,7 +50,6 @@ SYSFLAGS=  -DHOMEDIR=\"$(HOMEDIR)\" -DRSAMNAME=\"$(RSA
 		-DSAMSAVE=\"$(SAMSAVE)\"
 
 LIB=../libframe/libframe.a ../libXg/libXg.a
-CC=cc
 
 OBJ=sam.o address.o buffer.o cmd.o disc.o error.o file.o io.o \
 	list.o mesg.o moveto.o multi.o rasp.o regexp.o shell.o \
